Every OPC UA server contains a set of interconnected nodes (an address space) and exposes it to OPC UA clients. The nodes form a general graph (a full "mesh"), where the edges that connect the vertices (nodes) are called references.
There are many pre-defined nodes described by OPC UA specifications that exist in the OPC UA server, and OPC Wizard takes care of implementing them automatically. and When you develop an OPC UA sever using OPC Wizard, you are actually defining a subset of the address space - a tree of custom nodes that "lives" under the standard Objects folder in the OPC UA address space.
Every server node that you define in OPC Wizard is represented by an instance of some node type derived from the UAServerNode Class. The concrete server node can be one of the following:
The inheritance hierarchy of the server node classes looks like this:
Each server node has a name (a string; Name Property). The name must be unique among the sub-nodes of the parent node.
If your implementation needs it, a node can be associate any object you like. This is done using the State Property of the node.
Server nodes, in general, can contain sub-nodes, forming a hierarchy (a tree). However, not all types of sub-nodes are allowed everywhere. Following rules apply:
The picture below shows an example of "node space", a tree of nodes under the Objects folder.
Various combinations of server nodes can be seen on the example picture, demonstrating that:
The basic way of populating the node space is as follows:
The procedure above can always be used. The OPC Wizard, however, has several useful features that can make the process easier:
The following example adds nodes to the Objects folder.
The following example creates nested folders.
The following example creates data variables nested in other nodes.
In OPC UA, the primary means of identifying a node in the address space is the Node Id (see OPC UA Node IDs). The OPC Wizard takes care of creating the node IDs for the nodes you define. It places all nodes under a common namespace, controlled by the ObjectsNamespaceUriString Property of the EasyUAServer object. OPC Wizard uses string identifiers for the node Ids, and constructs the string by concatenating the node names (starting from the first level under the Objects folder), and separating them with a dot ('.').
If you need to know the actual (effective) node Id of any node that you have defined and placed in the address space of the server, retrieve its EffectiveNodeDescriptor Property. The effective node descriptor contains the effective node Id, and also the browse path for the node, starting at the Objects folder.
The following example illustrates how the effective node descriptors can be obtained.
Sometimes there is a need to find certain node in the node space, or traverse through the nodes in a specific way. Since you are writing the code that constructs the nodes and relates them together, you can always store references to the nodes you have created - as you are creating them - into any kind of data structure that suits the lookup or navigation needs, and use this data structure when needed. That is actually the preferred approach, because you can implement it in a way that is both convenient and efficient in your application.
In absence of your own lookup or traversal structures, you can use the built-in features in the OPC Wizard to search and navigate through the nodes. Following are the main means of doing so: